package com.mojo.pojo;

import java.util.StringJoiner;

/**
 * 人类，示例依赖注入
 *
 * @author <a href="mailto:sjj@jianzhimao.com">mojo</a>
 * copyright (C), 2013-2022, 广州九尾信息科技有限公司
 * @date 2022/3/2 14:16
 */
public class Person {
    private Teacher teacher;
    private Student student;
    private int total;

    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }

    public Student getStudent() {
        return student;
    }

    public void setStudent(Student student) {
        this.student = student;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Person.class.getSimpleName() + "[", "]")
                .add("teacher=" + teacher)
                .add("student=" + student)
                .add("total=" + total)
                .toString();
    }
}
